package com.soft.util.encrypt;

import java.util.HashMap;
import java.util.Map;

public class SmallSignGateway {
    public static String getSmallSignStr(String data, String timestamp, String appSecret){
        Map<String, String> map = new HashMap<>();
        String encryptData = Aes.encryptAes(data,appSecret);
        String method = "app.login.password";
        map.put("method", method);
        map.put("nonce", "11111");
        map.put("appkey", "${appkey}");
        map.put("timestamp", timestamp);
        map.put("signType", "md5");
        map.put("version", "1.0");
        map.put("isEncrypt", "true");
        map.put("encryptType", "AesOld");
        map.put("data", encryptData);
        String sign = Md5.sign(SignCore.createLinkString(map), appSecret, "");
        return sign;
    }


}
